.class public Lcom/glympse/android/glympse/DlgSettings$PromptForTicketCallback;
.super Ljava/lang/Object;
.source "DlgSettings.java"

# interfaces
.implements Lcom/glympse/android/glympse/DlgShell$DlgShellListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/DlgSettings;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "PromptForTicketCallback"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/DlgSettings;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/DlgSettings;)V
    .locals 0
    .parameter

    .prologue
    .line 354
    iput-object p1, p0, Lcom/glympse/android/glympse/DlgSettings$PromptForTicketCallback;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public OnCancel(Lcom/glympse/android/glympse/DlgShell;)V
    .locals 0
    .parameter "oDlgShell"

    .prologue
    .line 393
    return-void
.end method

.method public OnDismissed(Lcom/glympse/android/glympse/DlgShell;Z)V
    .locals 1
    .parameter "oDlgShell"
    .parameter "fOk"

    .prologue
    .line 398
    if-eqz p2, :cond_0

    .line 401
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgSettings$PromptForTicketCallback;->this$0:Lcom/glympse/android/glympse/DlgSettings;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/DlgSettings;->dismiss()V

    .line 403
    :cond_0
    return-void
.end method

.method public OnOk(Lcom/glympse/android/glympse/DlgShell;)V
    .locals 5
    .parameter "oDlgShell"

    .prologue
    .line 360
    check-cast p1, Lcom/glympse/android/glympse/DlgPrompt;

    .end local p1
    invoke-virtual {p1}, Lcom/glympse/android/glympse/DlgPrompt;->GetText()Ljava/lang/String;

    move-result-object v2

    .line 363
    .local v2, strText:Ljava/lang/String;
    const-string v3, "@WipeAccount"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 365
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    invoke-virtual {v3}, Lcom/glympse/platform/Config;->WipeAccount()V

    .line 366
    sget-object v3, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v3}, Lcom/glympse/android/glympse/Glympse;->StartExit()V

    .line 388
    :cond_0
    :goto_0
    return-void

    .line 371
    :cond_1
    const-string v3, "@Susagep"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_3

    .line 373
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v4

    iget-object v4, v4, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-boolean v4, v4, Lcom/glympse/platform/Config;->m_fDebug:Z

    if-eqz v4, :cond_2

    const/4 v4, 0x0

    :goto_1
    iput-boolean v4, v3, Lcom/glympse/platform/Config;->m_fDebug:Z

    .line 374
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    invoke-virtual {v3}, Lcom/glympse/platform/Config;->Save()V

    goto :goto_0

    .line 373
    :cond_2
    const/4 v4, 0x1

    goto :goto_1

    .line 378
    :cond_3
    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->Base32ToLong(Ljava/lang/String;)J

    move-result-wide v0

    .line 379
    .local v0, lTicketId:J
    const-wide/16 v3, 0x0

    cmp-long v3, v3, v0

    if-eqz v3, :cond_0

    .line 382
    sget-object v3, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iput-wide v0, v3, Lcom/glympse/android/glympse/Glympse;->m_lFocusTicket:J

    .line 385
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v3, v0, v1}, Lcom/glympse/platform/common/ServerPost;->AddReceivedTicket(J)Z

    .line 386
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v3}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    goto :goto_0
.end method
